Obtaining the Mapping From a Format Object
To access a format object's mapping, your application uses theGXGetFormatMapping
function. Listing 3-15 shows how to obtain the mapping for the format object associated with thewhichPage
page.Listing 3-15 Obtaining a format object's mapping
OSErr MyGetFormatMapping(MyDocumentPtr myDocument, long whichPage, gxMapping *theMapping) { gxFormat pgFormat; /* Get the current page's format. A nil reference specifies using the job's format object. */ pgFormat = myDocument->pageFormat[whichPage -1]; if (pgFormat == nil) pgFormat = GXGetJobFormat(myDocument->documentJob, 1); /* Get the format's mapping. */ GXGetFormatMapping(pgFormat, theMapping); return GXGetJobError(myDocument->documentJob); }For an introduction to mapping, see "Mapping for Format Objects" beginning on page 3-18.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help